Skip to main content

Discussion 4: Mental Models and Closures

Welcome to the fourth discussion! This week you'll learn more about mental models and working with closures.

Materials

Download the lab slides here.

The slides with solutions will be posted here after the last discussion of the day.

Download the starter code here. Make sure to submit this to gradescope, ask your lab leaders to help you if you are unsure of how. We'll also show the process in the first lab.

The solution file will be posted here after lab.

Opening and working with the starter code

  • If you need help installing VSCode and Node.js (required for this course), read this page.
    • You will need a Node.js version starting from v16 and less than v20
  • If you need help opening the project, read this page.
  • After opening, run npm install in a VSCode terminal

Submitting

Use the following command to build a .zip file:

npm run build:submission

This command will automatically format your submissions source code so it is easier to read then bundle your ./src/* files into a .zip. Please upload this file to the respective assignment on Gradescope.